/*
 * Test.java
 */
package org.opencube.data.ws;

import java.rmi.Remote;
import java.rmi.RemoteException;

import org.opencube.data.*;


/**
 * Simple interface for use in web service.
 */
public interface DataSourceService extends Remote 
{
	public static final String PARAM_PROPERTIES_FILE_NAME = "service_properties";
	
	public static final String PROPERTY_DS_URL = "ds_url"; 
	public static final String PROPERTY_DS_USER = "ds_user"; 
	public static final String PROPERTY_DS_PASSWORD = "ds_password";
	public static final String PROPERTY_DS_CLASS = "ds_class";
	
	public static final String PROPERTY_LOGGER_PATH = "logger_path";
	public static final String PROPERTY_LOGGER_LEVEL = "logger_level";
	

	public void commit() throws RemoteException;

	public boolean execute( String statement ) throws RemoteException;

	public CallResult executeCall( String statement, BoundVariable[] bindVariables ) throws RemoteException;

	public RecordSet executeQuery( String query ) throws RemoteException;

	public int executeUpdate( String statement ) throws RemoteException;

	public int executeBatch( String statement, BoundVariable[][] boundVariables ) throws RemoteException;
	
	public int getMinimumBatchSize() throws RemoteException;
	
	public boolean supportsBatching() throws RemoteException;

	public boolean isAutoCommit() throws RemoteException;

	public void rollback() throws RemoteException;

	public void setAutoCommit( boolean autoCommit ) throws RemoteException;
}
